/* 知识图谱样式 - 与整体主题保持一致 */
.knowledge-graph-container {
  height: 100vh;
  padding: 16px;
  background: #f5f5f5;
  color: #262626;
}

.knowledge-graph-container .ant-card {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #d9d9d9;
  background: #ffffff;
}

.knowledge-graph-container .ant-card-head {
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid #d9d9d9;
}

.knowledge-graph-container .ant-card-head-title {
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
}

.knowledge-graph-container .ant-card-body {
  background: #ffffff;
  border-radius: 0 0 8px 8px;
  color: #262626;
}

/* SVG容器样式 */
.knowledge-graph-container svg {
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #d9d9d9;
}

/* 节点样式 */
.knowledge-graph-container .nodes circle {
  transition: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* 移除CSS悬停效果，由JavaScript控制 */
.knowledge-graph-container .nodes circle:hover {
  /* 所有悬停效果由JavaScript处理 */
}

/* 连线样式 */
.knowledge-graph-container .links line {
  transition: none;
  stroke: #d9d9d9;
}

/* 移除CSS悬停效果，由JavaScript控制 */
.knowledge-graph-container .links line:hover {
  /* 所有悬停效果由JavaScript处理 */
}

/* 标签样式 */
.knowledge-graph-container .labels text {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px;
  font-weight: 500;
  fill: #262626;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
  transition: none;
}

/* 控制面板样式 */
.knowledge-graph-container .ant-slider {
  margin: 8px 0;
}

.knowledge-graph-container .ant-slider-track {
  background: #1890ff;
}

.knowledge-graph-container .ant-slider-handle {
  border-color: #1890ff;
  background: #1890ff;
}

.knowledge-graph-container .ant-slider-handle:hover {
  border-color: #40a9ff;
  background: #40a9ff;
}

.knowledge-graph-container .ant-statistic {
  margin: 8px 0;
}

.knowledge-graph-container .ant-statistic-title {
  font-size: 12px;
  color: #8c8c8c;
}

.knowledge-graph-container .ant-statistic-content {
  font-size: 16px;
  color: #1890ff;
}

/* 按钮组样式 */
.knowledge-graph-container .ant-space {
  width: 100%;
}

.knowledge-graph-container .ant-btn {
  border-radius: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #d9d9d9;
  background: #ffffff;
  color: #262626;
  position: relative;
  overflow: hidden;
}

.knowledge-graph-container .ant-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: #1890ff;
  color: #1890ff;
}

.knowledge-graph-container .ant-btn-primary {
  background: #1890ff;
  border-color: #1890ff;
  color: white;
}

.knowledge-graph-container .ant-btn-primary:hover {
  background: #40a9ff;
  border-color: #40a9ff;
  color: white;
}

/* 按钮加载状态动画 */
.knowledge-graph-container .ant-btn-loading {
  position: relative;
}

.knowledge-graph-container .ant-btn-loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: buttonShimmer 1.5s infinite;
}

@keyframes buttonShimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* 按钮禁用状态 */
.knowledge-graph-container .ant-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.knowledge-graph-container .ant-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* 输入框样式 */
.knowledge-graph-container .ant-input {
  border-radius: 6px;
  border: 1px solid #d9d9d9;
  background: #ffffff;
  color: #262626;
  transition: all 0.3s ease;
}

.knowledge-graph-container .ant-input::placeholder {
  color: #bfbfbf;
}

.knowledge-graph-container .ant-input:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
  background: #ffffff;
}

/* 选择器样式 */
.knowledge-graph-container .ant-select {
  border-radius: 6px;
}

.knowledge-graph-container .ant-select-selector {
  border-radius: 6px !important;
  background: #ffffff !important;
  border: 1px solid #d9d9d9 !important;
  color: #262626 !important;
}

.knowledge-graph-container .ant-select-selection-item {
  color: #262626 !important;
}

.knowledge-graph-container .ant-select-arrow {
  color: #bfbfbf !important;
}

/* 开关样式 */
.knowledge-graph-container .ant-switch {
  background-color: #d9d9d9;
}

.knowledge-graph-container .ant-switch-checked {
  background-color: #1890ff;
}

/* 文本样式 */
.knowledge-graph-container .ant-typography {
  color: #262626;
}

.knowledge-graph-container .ant-typography-caption {
  color: #8c8c8c;
}

/* 分割线样式 */
.knowledge-graph-container .ant-divider {
  border-color: #d9d9d9;
}

/* 抽屉样式 */
.knowledge-graph-container .ant-drawer-header {
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  border-bottom: 1px solid #d9d9d9;
}

.knowledge-graph-container .ant-drawer-title {
  color: #ffffff;
  font-weight: 600;
}

.knowledge-graph-container .ant-drawer-body {
  background: #ffffff;
  color: #262626;
}

.knowledge-graph-container .ant-drawer-close {
  color: #bfbfbf;
}

.knowledge-graph-container .ant-drawer-close:hover {
  color: #262626;
}

/* 列表样式 */
.knowledge-graph-container .ant-list-item {
  border-bottom: 1px solid #f0f0f0;
  padding: 12px 0;
}

.knowledge-graph-container .ant-list-item:last-child {
  border-bottom: none;
}

/* 工具提示样式 */
.knowledge-graph-container .ant-tooltip-inner {
  background: #ffffff;
  color: #262626;
  border: 1px solid #d9d9d9;
}

.knowledge-graph-container .ant-tooltip-arrow::before {
  background: #ffffff;
  border: 1px solid #d9d9d9;
}

/* 滚动条样式 */
.knowledge-graph-container ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.knowledge-graph-container ::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 4px;
}

.knowledge-graph-container ::-webkit-scrollbar-thumb {
  background: #d9d9d9;
  border-radius: 4px;
}

.knowledge-graph-container ::-webkit-scrollbar-thumb:hover {
  background: #bfbfbf;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .knowledge-graph-container {
    padding: 8px;
  }
  
  .knowledge-graph-container .ant-col:first-child {
    margin-bottom: 16px;
  }
}

@media (max-width: 768px) {
  .knowledge-graph-container {
    padding: 4px;
  }
  
  .knowledge-graph-container .ant-card {
    margin-bottom: 8px;
  }
}

/* 动画效果 */
@keyframes nodePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.knowledge-graph-container .nodes circle.highlighted {
  animation: nodePulse 2s infinite;
}

/* 加载动画 */
.knowledge-graph-container .ant-spin-dot-item {
  background-color: #1890ff;
}

/* 消息提示样式 */
.knowledge-graph-container .ant-message-notice-content {
  background: #ffffff;
  border: 1px solid #d9d9d9;
  color: #262626;
}
